<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="stylesheet" href="/ttpstatic/study/layui/css/layui.css">
  <link rel="stylesheet" href="/ttpstatic/study/css/style.css?v=4">
  <link rel="icon" href="/ttpstatic/favicon.ico">
  {% block css %}
  {% endblock %}
  <title>{{ web_title|default:"e安行实训平台" }}</title>
</head>

<body>
  <header id="header" style="display: none">
    <div  class="flex-row-between" id="head-nav">
    {% block header %}
      <ul>
        {% if request.path == '/' %}
          <li><a class="current" href="{% url 'study:index' %}">e安行实训平台</a></li>
        {% else %} 
          <li><a href={% url 'study:index' %}>e安行实训平台</a></li>
        {% endif %}
        {% if 'course' in request.path %}
          <li><a class="current" href="{% url 'study:courses' %}">精品课程</a></li>
        {% else %} 
          <li><a href={% url 'study:courses' %}>精品课程</a></li>
        {% endif %}
        {% if 'experiment' in request.path %}
          <li><a class="current" href="{% url 'study:experiments' %}">实验</a></li>
        {% else %} 
          <li><a href={% url 'study:experiments' %}>实验</a></li>
        {% endif %}
        {% if 'exam' in request.path %}
          <li><a class="current" href="{% url 'study:exams' %}">考试测试</a></li>
        {% else %} 
          <li><a href={% url 'study:exams' %}>考试测试</a></li>
        {% endif %}
          <li><a href={% url 'study:download' %}>客户端下载</a></li>
      </ul>
      {% load env %}
      {% if user.is_authenticated %}
        {% if user.user_type == 'S' %}
          <a href="{% url 'study:userCenter' %}"> 个人中心 </a>
        {%endif %}
        {% if user.user_type == 'A' %}
          <a href="{{user.user_type|panel_page}}"> 控制面板 </a>
        {%endif %}
        {% if user.user_type == 'T' %}
          <a href="{{user.user_type|panel_page}}"> 教师端 </a>
        {%endif %}
      {% else %}
        <a href={% url 'study:login' %} >登录</a>
      {%endif%}
    {% endblock %}
    </div>
  </header>
  <div id="content">
      {% block content %}{% endblock %}
  </div>
  {% comment %} <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script> {% endcomment %}
  <script src="/ttpstatic/js/js-cookie.js"></script>
  <script src="/ttpstatic/study/js/index.js"></script>
  {% block script %}
  {% endblock %}
</body>
</html>